package ModelLayer;
import java.util.ArrayList;


/**
 * Write a description of class Order here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class Order
{
    private int id;
    private double totalPrice;
    private String date;
    private double withoutVAT;
    private double VAT;
    private ArrayList<PartOrder> partOrders;
    private String status;
    private double VATPrice;
    private Person orderedBy;//Ronni
    private String customersName;
    
    /**
     * Constructor for objects of class Order
     */
    public Order(int id, String date, String customersName)
    {
        this.id = id;
        totalPrice = 0;
        this.date = date;
        withoutVAT = 0;
        VAT = 0.20;
        this.VATPrice = 0;
        status = "";
        this.customersName = customersName;
        partOrders = new ArrayList<PartOrder>();
    }
    
    public Order(int id, String date)
    {
        this.id = id;
        totalPrice = 0;
        this.date = date;
        withoutVAT = 0;
        VAT = 0.20;
        this.VATPrice = 0;
        status = "";
        customersName = "";
        partOrders = new ArrayList<PartOrder>();
    }
    
    public void addPartOrder(PartOrder newPartOrder)
    {
        partOrders.add(newPartOrder);
    }
    
    public void setId(int id)
    {
        this.id = id; 
    }
    
    public int getId()
    {
        return id;
    }
    
    public void setTotalPrice(double totalPrice)
    {
        this.totalPrice = totalPrice; 
    }
    
    public double getTotalPrice()
    {
        return totalPrice;
    }
    
    public void setDate(String date)
    {
        this.date = date; 
    }
    
    public String getDate()
    {
        return date;
    }
    
    public void setWithoutVAT(double withoutVAT)
    {
        this.withoutVAT = withoutVAT; 
    }
    
    public double getWithoutVAT()
    {
        return withoutVAT;
    }
    
    public void setVAT(double VAT)
    {
        this.VAT = VAT; 
    }
    
    public double getVAT()
    {
        return VAT;
    }
    
    public ArrayList<PartOrder> getPartOrders()
    {
        return partOrders;
    }
    
    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }
    
    public void setVATPrice(double newVATPrice)
    {
        this.VATPrice = newVATPrice;
    }

    public double getVATPrice()
    {
        return VATPrice;
    }
    public Person getOrderedBy()
    {
        return orderedBy;
    }    
    public void setOrderedBy(Person orderedBy)
    {
        this.orderedBy = orderedBy;
    }        
    
    public void setCustomersName(String customersName)
    {
        this.customersName = customersName;
    }

    public String getCustomersName()
    {
        return customersName;
    }
}
